/*
 * SystemTimer.h
 *
 *  Created on: 2009/01/12
 *      Author: elecgon
 */

#ifndef SYSTEMTIMER_H_
#define SYSTEMTIMER_H_

#ifndef PREREQUISITES_H_
#	include "core/Prerequisites.h"
#endif

#ifndef ISINGLETON_H_
#	include "core/ISingleton.h"
#endif

class SystemTimer : public ISingleton<SystemTimer>
{
public:
	SystemTimer();
	virtual ~SystemTimer();

public:
	static SystemTimer& GetInstance()
	{
		assert(m_pInstance);
		return *m_pInstance;
	}
	static SystemTimer* GetInstancePtr()
	{
		return m_pInstance;
	}

public:
	uint32 getElapsed();
	static uint32 getTimeElapsed(uint32 now, uint32 prev);

private:
	uint32 mLastTime;

};

#endif /* SYSTEMTIMER_H_ */
